package typeconvert;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.generator.config.ITypeConvert;
import com.baomidou.mybatisplus.generator.config.converts.*;

public class TypeConverterProvider {
    public static ITypeConvert getTypeConvert(DbType dbType) {

        switch (dbType) {
            case ORACLE:
                return new CustomOracleTypeConvert();
            case MYSQL:
            case MARIADB:
                return new CustomMysqlTypeConvert();
        }

        return TypeConverts.getTypeConvert(dbType);
    }
}
